
<script lang="ts" setup>
import {useUserStore} from '@/stores/total'
const hhh = useUserStore()
</script>
<template>
    <div class="user">
        <div class="title">
            <div class="touxiang"><img class="user-img" src='https://cnbj1.fds.api.xiaomi.com/user-avatar/a3a66fd4-2789-49b8-8108-4a79e24001d3.jpg'  alt=""></div>
            <div class="user-name">{{hhh.name}}</div>
        </div>
        <div class="user-box">
            <div class="user-box-top">
                <div>我的订单</div>
                <router-link :to="{name:'order',query:{
                    index:0,name:'全部'
                }}">
                    <div style="font-size: 14px;">全部订单<van-icon name="arrow" /></div>
                </router-link>
               
            </div>
            <div class="user-box-item">
                <router-link :to="{name:'order',query:{
                    index:1,name:'待付款'
                }}" >
                    <div>
                    <van-icon style="margin-left: 7px;" size="28" name="pending-payment" />
                    <div class="user-dec">待付款</div>
                </div>
                </router-link>
               <router-link :to="{name:'order',query:{
                    index:2,name:'待收货'
                }}">
                <div>
                    <van-icon style="margin-left: 7px;" size="28" name="logistics" />
                    <div class="user-dec">待收货</div>
                </div>
               </router-link>
                <div>
                    <van-icon  style="margin-left: 7px;" size="28" name="bulb-o" />
                    <div class="user-dec">退换修</div>
                </div>
            </div>
            <div class="user-box-content">
                <div class="one">
                    <img class="uone" src="../../assets/会员.png" alt="">
                <div class="utwo">会员中心</div>
                <van-icon class="uthree" name="arrow" />
                </div>
                <div class="one">
                    <img class="uone" src="../../assets/优惠券.png" alt="">
                <div class="utwos">我的优惠</div>
                <van-icon class="uthree" name="arrow" />
                </div>
            </div>
            <div class="user-box-content">
                <div class="one">
                    <img class="uone" src="../../assets/服务中心.png" alt="">
                <div class="utwo">服务中心</div>
                <van-icon class="uthree" name="arrow" />
                </div>
                <div class="one">
                    <img class="uone" src="../../assets/寄宿.png" alt="">
                <div class="utwos">华米之家</div>
                <van-icon class="uthree" name="arrow" />
                </div>
            </div>
            <div class="user-box-content">
                <div class="one">
                    <img class="uone" src="../../assets/fastDFS.png" alt="">
                <div class="utwo">我的F码</div>
                <van-icon class="uthree" name="arrow" />
                </div>
                <div class="one">
                    <img class="uone" src="../../assets/1f381.png" alt="">
                <div class="utwos">礼物码兑换</div>
                <van-icon class="uthree" name="arrow" />
                </div>
            </div>
            <div class="user-box-content">
                <router-link to="setting">
                <div class="one">
                    <img class="uone" src="../../assets/205设置.png" alt="">
                <div class="utwos">设置</div>
                <van-icon class="uthree" name="arrow" />
                </div>
            </router-link>
            <router-view/>
            </div>
        </div>
    </div>
</template>


<style scoped>
*{
    margin: 0;
    padding: 0;
}
.user{
    width: 100vw;
    height: 100vh;
    background-color: #f5f5f5;
}
.title{
    
    padding: 16px 10px;
    display: flex;
    align-items: center;
   background: url('../../assets/R-C.jpg');
   background-repeat: no-repeat;
   background-size: cover;
}
.user-img{
    border-radius: 50%;
    width: 50px;
}
.user-name{
    color: white;
    font-size: 18px;
}
.touxiang{
    margin-right: 10px;
}
.user-box{
    height: 16vh;
    background-color: white;
}
.user-box-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: white;
    border-bottom: 2px solid #e4e4e4;
    
}
.user-box-item{
    display: flex;
    justify-content: space-between;
    padding: 20px 34px;
}
.user-dec{
    font-size: 14px;
}
.user-box-content{
    margin-top: 20px;
    background-color: #fff;
}
.one{
    display: flex;
    align-items: center;
}
.uone{
    margin:10px 20px;
    
}
.utwo{
    padding:20px 0;
    border-bottom:  2px solid #e6e6e6;
    flex:0 0 75vw
}
.utwos{
    padding:20px 0;
    flex:0 0 75vw
}

</style>